/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.srcptit.trainning.huongpq.btvn2;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.util.StringTokenizer;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author Admin_Pro
 */
public class Bai6 {

    public static void main(String[] args) {
        File f = new File("bai 6.txt");
        try {
            f.createNewFile();
            FileReader fr = new FileReader(f);
            BufferedReader br = new BufferedReader(fr);
            String a;
            try {
                a = br.readLine();
                StringTokenizer t = new StringTokenizer(a);
                while (t.hasMoreTokens()) {
                    String s = new String(t.nextToken());
                    s = s.toLowerCase();
                    StringBuffer s1 = new StringBuffer(s);
                    s1.replace(0, 1, (char) (s.charAt(0) - 32) + "");
                    System.out.print(s1 + " ");
                }
            } catch (Exception e) {
                System.out.println("loi: " + e);
            }
        } catch (IOException ex) {
            Logger.getLogger(Bai6.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
}
